﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using RecruitmentSystem.Business;
using RecruitmentSystem.Common;

public partial class StudentManagement_CVPreview : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BindCVInfo();
    }

    private void BindCVInfo()
    {
        AccountManager am = new AccountManager();
        PersonalUser pu = (PersonalUser)am.GetUserById(User.Identity.Name, UserType.PersonalUser);
        lbl_Name.Text = pu.Name;
        if (pu.Gender == 1)
            lbl_Sex.Text = "男";
        else
            lbl_Sex.Text = "女";
        lbl_CreateDate.Text = pu.Birthday.ToShortDateString();
        lbl_Height.Text = pu.Height.ToString();
        lbl_weight.Text = pu.Weight.ToString();
        if (pu.IsMarriage == true)
            lbl_ismarriaged.Text = "已婚";
        else
            lbl_ismarriaged.Text = "未婚";
        lbl_countplace.Text = pu.Province;
        lbl_IDCode.Text = pu.Code;
        lbl_level.Text = pu.Knowledge;
        lbl_graduateyear.Text = pu.GraduateYear.ToString();
        lbl_address.Text = pu.Address;
        lbl_tel.Text = pu.TelephoneNumber;
        lbl_zipcode.Text = pu.PostCode;
        lbl_cellphone.Text = pu.CellphoneNumber;
        lbl_email.Text = pu.MailAddress;
        lbl_liveplace.Text = pu.District;
        lbl_currentstate.Text = pu.CurrentStatu;
        lbl_homepage.Text = pu.Homepage;
        lbl_profeesionalDescription.Text = pu.ProfessionaldescriptionAndSelfevaluation;
        lbl_workexperienceDescription.Text = pu.WorkexperienceAndDescription;
        if (pu.HeadPic != null)
        {
            this.imgHead.ImageUrl = pu.HeadPic;
            this.Panel_ShowHidelink.Visible = false;
        }
        else
        {
            this.Panel_ShowHidelink.Visible = true;
        }
    }
}
